//
//  WordListViewModel.m
//  EnglishStudyApp
//
//  Created by Nong Trung Nghia on 10/18/12.
//  Copyright (c) 2012 abc. All rights reserved.
//

#import "WordListViewModel.h"
#import "ESWord.h"
@implementation WordListViewModel
@synthesize wordList=_wordList;
+(WordListViewModel*)currentModel{
    WordListViewModel *model=[[WordListViewModel alloc] init];
    NSArray *array=[NSArray arrayWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"Resource" withExtension:@"plist"]];
    NSMutableArray *mutableArray=[[NSMutableArray alloc] initWithCapacity:array.count];
    for (NSDictionary *dic in array) {
        [mutableArray addObject:[ESWord wordFromDictionary:dic]];
    }
    model.wordList=mutableArray;
    NSLog(@"list:%@",model.wordList);
    return model;
    
}
@end
